<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>管理后台</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link href="/favicon.ico" type="image/x-icon" rel="shortcut icon" />

    <link href="/public/static/admin/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/public/static/admin/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="/public/static/admin/css/ratuo.css" rel="stylesheet">

    <script src="/public/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/static/admin/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/public/static/admin/js/myFormValidate.js"></script>
    <script src="/public/static/admin/js/common.js"></script>
    <script src="/public/static/admin/js/myAjax.js"></script>
    <script src="/public/static/admin/js/plugins/layer/layer.min.js"></script>
    <script src="/public/static/admin/js/jquery.validate.js"></script>

</head>

<div class="wrapper">

    <section class="content">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-list"></i> 产品属性</h3>
                </div>
                <div class="panel-body">
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#tab_tongyong" data-toggle="tab">产品属性</a></li>
                    </ul>
                    <!--表单数据-->
                    <form method="post" id="addEditProductAttributeForm">                    
                        <!--通用信息-->
                    <div class="tab-content">                 	  
                        <div class="tab-pane active" id="tab_tongyong">
                           
                            <table class="table table-bordered">
                                <tbody>
                                <tr>
                                    <td>属性名称：</td>
                                    <td>
                                        <input type="text" value="{$productAttribute.attr_name}" name="attr_name"/>
                                        <span id="err_attr_name" style="color:#F00; display:none;"></span>
                                    </td>
                                </tr>  
                                <tr style="display:none">
                                    <td>所属产品属性组：</td>
                                    <td>
                                        <select name="type_id" id="type_id">
                                             <option value="">请选择</option>
                                            {volist name="productTypeList" id="vo"}
                                             <option value="{$vo[id]}" {if $vo[id] == $productAttribute[type_id]}selected="selected"{/if}>{$vo[name]}</option>
                                            {/volist}
                                        </select>
                                        <span id="err_type_id" style="color:#F00; display:none;"></span>                                        
                                    </td>
                                </tr>  
                                <tr>
                                    <td>所属产品分类：</td>
                                    <td>
                                        <select name="kind_id" id="kind_id">
                                             <option value="">请选择</option>
                                            <?php echo $cat_select ?>
                                        </select>                                        
                                    </td>
                                </tr>  
                                <!-- <tr>
                                    <td>能否进行检索：</td>
                                    <td>
                                        <input type="radio" value="0" name="attr_index" <if condition="$productAttribute[attr_index] eq 0">checked="checked"</if>  .>不需要检索
                                        <input type="radio" value="1" name="attr_index" <if condition="($productAttribute[attr_index] eq 1) or ($productAttribute[attr_index] eq NULL)">checked="checked"</if>  />关键字检索
                                        <input type="radio" value="2" name="attr_index" <if condition="$productAttribute[attr_index] eq 2">checked="checked"</if>  />范围检索
                                    </td>
                                </tr> -->
                                <!-- <input type="hidden" value="0" name="attr_index"> -->
                                <!-- <tr>
                                    <td>属性是否可选：</td>
                                    <td>
                                        <input type="radio" value="0" name="attr_type" <if condition="($productAttribute[attr_type] eq 0) or ($productAttribute[attr_type] eq NULL)">checked="checked"</if>  />唯一属性
                                        <input type="radio" value="1" name="attr_type" <if condition="$productAttribute[attr_type] eq 1">checked="checked"</if> />单选属性
                                        <input type="radio" value="2" name="attr_type" <if condition="$productAttribute[attr_type] eq 2">checked="checked"</if> />复选属性 
                                    </td>
                                </tr> -->
                                <input type="hidden" value="2" name="attr_type"/>

                                

                                <tr>
                                    <td>该属性值的录入方式：</td>
                                    <td>
                                        <input type="radio" value="1" name="attr_input_type" checked="checked"/>从下面的列表中选择（一行代表一个可选值）
                                    </td>
                                </tr>  
                                <tr>
                                    <td>可选值列表：</td> 
                                    <td>
                                    <textarea rows="5" cols="30" name="attr_values">{$productAttribute.attr_values}</textarea>
                                    <span id="err_attr_values" style="color:#F00; display:none;"></span>
                                    </td>
                                </tr>    
                                <tr>
                                    <td>是否隐藏：</td>
                                    <td>
                                        <input type="radio" value="1" name="attr_state" {if $productAttribute[attr_state] == 1}checked="checked"{/if} />是
                                        <input type="radio" value="0" name="attr_state" {if ($productAttribute[attr_state] == 0) or ($productAttribute[attr_state] == NULL)}checked="checked"{/if}  />否
                                    </td>
                                </tr>                            
                                </tbody>                                
                                </table>
                        </div>                           
                    </div>              
                    <div class="pull-right">
                        <input type="hidden" name="attr_id" value="{$productAttribute.attr_id}">
                        <button class="btn btn-primary" title="" data-toggle="tooltip" type="button" onclick="ajax_submit_form('addEditProductAttributeForm','{:url('product/addEditProductAttribute?is_ajax=1')}');" data-original-title="保存">保存</button>
                    </div>
			    </form><!--表单数据-->
                </div>
            </div>
        </div>    <!-- /.content -->
    </section>
</div>
</body>
</html>